#include "Stdafx.h"
#include "IMemory.h"

//Memory::Memory(int memorySize)
//{
//	baseAddress = 0;
//	endAddress = memorySize - 1;
//
//	data = gcnew array<UInt32>(memorySize);
//}
//
//UInt32 Memory::GetValueAt(int i)
//{
//	if (i >= 0 && i <= endAddress)
//	{
//		return data[i];
//	}
//
//	throw gcnew IndexOutOfRangeException(
//		"Memory access out of range. Memory start address: " + 
//		baseAddress + " - Memory end address: " + 
//		endAddress + " - Access Adress: " + i);
//}
//
//void Memory::SetValueAt(int i, UInt32 value)
//{
//	if (i >= 0 && i <= endAddress)
//	{
//		data[i] = value;
//	}
//
//	throw gcnew IndexOutOfRangeException(
//		"Memory access out of range. Memory start address: " + 
//		baseAddress + " - Memory end address: " + 
//		endAddress + " - Access Adress: " + i);
//}
